From 093a4e83d581b7a5547f4712f67b2e7ef82fd8ce Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 18 Apr 2023 16:37:43 +0200 Subject: [PATCH] macos: Move construction stuff into ::constructed --- gdk/macos/gdkmacossurface.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/gdk/macos/gdkmacossurface.c b/gdk/macos/gdkmacossurface.c index dc4375730c..1c2008a521 100644 --- a/gdk/macos/gdkmacossurface.c +++ b/gdk/macos/gdkmacossurface.c @@ -527,6 +527,9 @@ gdk_macos_surface_constructed (GObject *object) G_CONNECT_SWAPPED); } + gdk_surface_freeze_updates (GDK_SURFACE (self)); + _gdk_macos_surface_monitor_changed (self); + if (self->window != NULL) _gdk_macos_surface_configure (self); } @@ -612,13 +615,9 @@ gdk_macos_surface_init (GdkMacosSurface *self) } GdkMacosSurface * -_gdk_macos_surface_new (GdkMacosDisplay *display, - GdkSurfaceType surface_type, - GdkSurface *parent, - int x, - int y, - int width, - int height) +_gdk_macos_surface_new (GdkMacosDisplay *display, + GdkSurfaceType surface_type, + GdkSurface *parent) { GdkFrameClock *frame_clock; GdkMacosSurface *ret; @@ -649,12 +648,6 @@ _gdk_macos_surface_new (GdkMacosDisplay *display, ret = NULL; } - if (ret != NULL) - { - gdk_surface_freeze_updates (GDK_SURFACE (ret)); - _gdk_macos_surface_monitor_changed (ret); - } - g_object_unref (frame_clock); return g_steal_pointer (&ret); -- 2.30.2